package com.deep.product.feign;

import com.deep.common.utils.R;
import com.deep.product.model.dto.SeckillSkuDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 秒杀服务调用
 *
 * @author Deep
 * @date 2022/2/26
 */
@FeignClient("mall-seckill")
public interface SeckillFeignService {

    @GetMapping("/api/seckill/getCurrentSeckillSkus")
    List<SeckillSkuDTO> getCurrentSeckillSkus();

    /**
     * 根据skuId查询商品是否参加秒杀活动
     */
    @GetMapping(value = "/api/seckill/sku/{skuId}")
    R getSkuSeckillInfo(@PathVariable("skuId") Long skuId);
}
